


<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Lieu extends MemberController
{
	/**
	* Constructeur
	*/
	public function __construct()
	{
		parent::__construct();
		
		//On change le titre de la page
		parent::setPageName('Partager du contenu');
		
		//On change la vue du menu
		parent::setMenuView('menu/share_menu');
	}
	
	public function add()
	{
			parent::setPageName('Ajouter un lieu');
			parent::loadHeader();
			
			$this->load->view('notification_zone');
			
			$data['list_lieu'] =  Lieux::getAllTypeLieu();
			$data["data"] = Lieux::get_villes();
			$this->load->view('form/add_lieu',$data);
			
			parent::loadFooter();
	}

	
	public function affiche_lieu($id)
	{
		$data['data'] = Lieux::getInfo($id);
		$this->load->view('event/viewEvent',$data);
	}
	public function ajax_get_typeLieux()
	{
		$data =Lieux::getAllTypeLieu();
		echo json_encode($data);
	}

	public function ajax_get_lieux_by_type()
	{
		//echo "dsf";
		$data['data'] =Lieux::getLieu_by_type();

		$this->load->view('list_lieu2',$data);
		
	}

	public function ajax_search_lieu()
	{
		$data['data'] = Lieux::ajax_getLieuByName();
		$this->load->view('list_lieu',$data);
	}
	
	public function index()
	{
			parent::loadHeader();
			
			$this->load->view('event/index');
			
			parent::loadFooter();
	}
}



?>
